package com.huaxin.common.Entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by Administrator on 2016/12/22.
 */

public class VehicleRecord implements Parcelable {
    int id;
    long bindDate;
    String userName;
    String licensePlateNum;
    String vehicleModel;
    Long endDate;
    long arrangeTaskId;
    List<CLatLng> route;

    public int getId() {
        return id;
    }

    public long getBindDate() {
        return bindDate;
    }

    public String getUserName() {
        return userName;
    }

    public String getLicensePlateNum() {
        return licensePlateNum;
    }

    public String getVehicleModel() {
        return vehicleModel;
    }

    public Long getEndDate() {
        return endDate;
    }

    public long getArrangeTaskId() {
        return arrangeTaskId;
    }

    public List<CLatLng> getRoute() {
        return route;
    }

    protected VehicleRecord(Parcel in) {
        id = in.readInt();
        bindDate = in.readLong();
        userName = in.readString();
        licensePlateNum = in.readString();
        vehicleModel = in.readString();
        arrangeTaskId = in.readLong();
        route = in.createTypedArrayList(CLatLng.CREATOR);
    }

    public static final Creator<VehicleRecord> CREATOR = new Creator<VehicleRecord>() {
        @Override
        public VehicleRecord createFromParcel(Parcel in) {
            return new VehicleRecord(in);
        }

        @Override
        public VehicleRecord[] newArray(int size) {
            return new VehicleRecord[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeLong(bindDate);
        dest.writeString(userName);
        dest.writeString(licensePlateNum);
        dest.writeString(vehicleModel);
        dest.writeLong(arrangeTaskId);
        dest.writeTypedList(route);
    }
}
